<?php
/**
 * Created by PhpStorm.
 * User: LiuJiaJun
 * Date: 2019/1/7
 * Time: 15:21
 */

namespace api\storage\common;

use api\storage\exception\TypeNotFoundException;
use api\storage\service\output\ForeignOutputService;
use api\storage\service\output\LocalOutputService;
use think\Exception;

class OutputFactory
{

    public static function getBomService($type){
        switch ($type){
            case 0:
                return new LocalOutputService();
                break;
            case 1:
                return new ForeignOutputService();
                break;
            default:
                throw new TypeNotFoundException();
        }
    }
}